/*
 *  NPC.h
 *  SquirrelAdven
 *
 *  Created by Wen Xu on 3/7/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include <string>
#include "Wm5WindowApplication3.h"
#include "DialogTree.h"

using namespace Wm5;

class NPC{
protected:
	int characterID;
	std::string characterTitle;
	std::string characterName;
	std::string characterSpecies;
	std::string characterBackground;
	
	std::string objFilename;
	std::string dialogFilename;
	std::string wmtfFilename;
	
	TriMesh * characterMesh;
	DialogTree * dialogTree;
	
	// translate
	float t_x, t_y, t_z;
	// scale
	float s_x, s_y, s_z;
	
	// for collision detection
	Float3 centerPoint;
	float len_x, len_y, len_z;
	float radius;
		
public:
	// constructor
	NPC();
	// destructor
	~NPC();
	
	// compute bounding box
	void computeBoundingBox();
	
	// get TriMesh of the NPC
	TriMesh * getCharacterMesh();
	// get DialogTree
	DialogTree * getDialogTree();
	
	// setter
	void setCharacterID(int ID);
	void setCharacterTitle(std::string title);
	void setCharacterName(std::string name);
	void setCharacterSpecies(std::string species);
	void setCharacterBackground(std::string background);
	void setObjFilename(std::string objFilename);
	void setDialogFilename(std::string dialogFilename);
	void setWmtfFilename(std::string wmtfFilename);
	
	void setOriginalTranslate(float x, float y, float z);
	void setOriginalScale(float x, float y, float z);
	
	// getter
	int getCharacterID();
	std::string getCharacterTitle();
	std::string getCharacterName();
	std::string getCharacterSpecies();
	std::string getCharacterBackground();
	
	float getOriginalLengthX();
	float getOriginalLengthY();
	float getOriginalLengthZ();
	
	float getOriginalTranslateX();
	float getOriginalTranslateY();
	float getOriginalTranslateZ();
	
	float getOriginalScaleX();
	float getOriginalScaleY();
	float getOriginalScaleZ();
	
	
	// bounding cylinder
	float getRadius();
	Float3 getCenterPoint();
	void modifyRadius(APoint scale_p);
	void modifyCenterPoint(APoint translate_p);
	
	// print
	void printData();
};
